Skip to content

Magento2 - Deploy multiple themes at once if using static_content_jobs #4174#4175

Merged
antonmedv merged 1 commit intodeployphp:masterfrom
getjohn:bug/GCT-1665-static-deploy-parallel-jobs
Mar 5, 2026
Merged

Magento2 - Deploy multiple themes at once if using static_content_jobs #4174#4175
antonmedv merged 1 commit intodeployphp:masterfrom
getjohn:bug/GCT-1665-static-deploy-parallel-jobs

Conversation

@johnorourke
Copy link
Contributor

Magento 2 theme deployment with multiple themes/locales and multiple CPUs:

This ensures that if you set static_deploy_jobs > 1, and use split deployment, then it will minimise the no. of static:content:deploy commands issued and make best use of multiple CPUs.

NOTE: I did try multiple themes per thread but it kept getting stuck after a while - literally the progress bars not moving - possibly the same issue as #3897 . So right now it just does as many as possible with one per thread.

EXAMPLE:

set('magento_themes', [
    'Acme/brand1' => 'en_US    fr_FR   de_DE',
    'Acme/brand2' => 'en_US    fr_FR   de_DE',
    'Acme/brand3' => 'en_US    fr_FR   de_DE',
]);

set('static_content_jobs',  8);

Previously, this would've run 1 command per theme - with 3 locales that would only be using 3 jobs of a possible 8.

Now, it will calculate that brand1/2/3 all share the same locales, but it can only run brand1+2 together because that's 6 theme/locale combinations, which will make use of 6 jobs. If it also added brand3, that would be 9 theme/locale combinations, so one of the jobs would be running twice as long as the rest.

USE CASE: we have 90 themes and some have 2-4 locales. This took deployment time down from over 1 hour to ~15 mins.

@antonmedv antonmedv merged commit b548174 into deployphp:master Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants